﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;

namespace MAQEmailGuidelines
{
    public partial class CheckNewMailItems
    {
        //public CheckNewMailItems()
        //    : base(Globals.Factory.GetRibbonFactory())
        //{
        //    InitializeComponent();
        //}
        private void CheckNewMailItems_Load(object sender, RibbonUIEventArgs e)
        {
            if (Properties.Settings.Default.Enabled)
            {              
                tglBtnEmailCheckPower.Checked = true;
            }
            else
            {             
                tglBtnEmailCheckPower.Checked = false;
            }
        }

        private void tglBtnEmailCheckPower_Click(object sender, RibbonControlEventArgs e)
        {
            if (tglBtnEmailCheckPower.Checked)
            {
                Properties.Settings.Default.Enabled = true;             
            }
            else
            {
                Properties.Settings.Default.Enabled = false;                
            }
        }
    }
}
